<%@ page pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='txgl' /></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
</head>
<body>

<div class="layui-fluid">

    <%--<div class="layui-card">--%>
    <%--<div class="layui-form layui-card-header layuiadmin-card-header-auto">--%>
    <%--<div class="layui-form-item">--%>
    <form name="totalForm" id="totalForm" method="get">

    </form>
    <%--</div>--%>
    <%--</div>--%>
    <%--</div>--%>

    <div class="layui-card">

        <div class="layui-field-box layui-form">
            <table class="layui-table" lay-size="sm">
                <thead>
                <th><fmt:message key='ddbh' /></th>
                <th><fmt:message key='srlx' /></th>
                <th><fmt:message key='srje' /></th>
                <th><fmt:message key='srsj' /></th>
                <th><fmt:message key='jszt' /></th>
                </thead>
                <c:forEach items="${tradings}" var="item" varStatus="status">
                    <tr>
                        <td><a href="javascript:void(0);" style="color:blue;" data-id="${item.orderNo}" class="feijin-detail">${item.orderNo }</a></td>
                        <td>
                            <c:choose>
                                <c:when test="${item.type eq 1}"><fmt:message key='spddwc' /></c:when>
                                <%--<c:when test="${item.type eq 2}">课程订单完成</c:when>--%>
                            </c:choose>
                        </td>
                        <td><fmt:formatNumber value="${item.amount}" type="CURRENCY"/></td>
                        <td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                        <td>
                            <c:choose>
                                <c:when test="${item.status eq 1}"><b style="color:orange"><fmt:message key='djs' /></b></c:when>
                                <c:when test="${item.status eq 2}"><b style="color:blue"><fmt:message key='jsshz' /></b></c:when>
                                <c:when test="${item.status eq 3}"><b style="color:green"><fmt:message key='yjs' /></b></c:when>
                            </c:choose>
                        </td>
                    </tr>
                </c:forEach>
            </table>
        </div>
    </div>

</div>

<script>

    layui.use(['layer', 'form', 'laydate'], function () {
        var layer = layui.layer;
        var laydate = layui.laydate;

        //查看详情
        $(".feijin-detail").click(function () {

            var id = $(this).attr("data-id");

            layer.open({
                type: 2
                , title: '<fmt:message key='ckxq' />'
                , content: '${web_domain}/supplier/order/' + id + '/orderDetail'
                , maxmin: true
                , area: ['97%', '97%']
                , btn: ['<fmt:message key='fh' />']
            });
        });

    });

</script>
</body>
</fmt:bundle>
</html>
